<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>

<body>
    <button>李白</button>
    <button>虞姬</button>
    <button>诸葛亮</button>
    <button>项羽</button>
    <button>哪吒</button>
    <script>
        $(function () {
            $('button').click(function () {
                $(this).css('color', 'red').siblings().css('color', '')
            });
        });
    </script>
</body>

</html>